package com.minhua.jijiehao2.mainframe.home.menulistactivity.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.ChannelBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.home.menulistactivity.imp.IMenuListModel

class MenuListModel : IMenuListModel {
    override fun getListChannel(map: ParamsMap, callback: CallBack<List<ChannelBean>>) {
        HttpController<List<ChannelBean>>().doHttp(
                ApiClient.getInstance().api.getMenuListById(map.toRequestBody()),
                object : BaseSubscriber<List<ChannelBean>>() {
                    override fun dealData(t: BaseBean<List<ChannelBean>>) {
                        super.dealData(t)
                        callback.onSuccess(t)
                    }
                }
        )
    }
}